﻿using System;

namespace Studio
{
	// Token: 0x02000472 RID: 1138
	public static class AddObjectCommand
	{
		// Token: 0x02000473 RID: 1139
		public class AddItemCommand : ICommand
		{
			// Token: 0x06001C46 RID: 7238 RVA: 0x000B6ADC File Offset: 0x000B4CDC
			public AddItemCommand(int _no, int _dicKey, int _initialPosition)
			{
				this.no = _no;
				this.dicKey = _dicKey;
				this.initialPosition = _initialPosition;
			}

			// Token: 0x06001C47 RID: 7239 RVA: 0x000B6B08 File Offset: 0x000B4D08
			public void Do()
			{
				OCIItem ociitem = AddObjectItem.Load(new OIItemInfo(this.no, this.dicKey), null, null, true, this.initialPosition);
				this.tno = ((ociitem == null) ? null : ociitem.treeNodeObject);
			}

			// Token: 0x06001C48 RID: 7240 RVA: 0x000B6B50 File Offset: 0x000B4D50
			public void Undo()
			{
				Studio.DeleteNode(this.tno);
				this.tno = null;
			}

			// Token: 0x06001C49 RID: 7241 RVA: 0x000B6B64 File Offset: 0x000B4D64
			public void Redo()
			{
				this.Do();
				Studio.SetNewIndex(this.dicKey);
			}

			// Token: 0x04001F5B RID: 8027
			private int no = -1;

			// Token: 0x04001F5C RID: 8028
			private int dicKey = -1;

			// Token: 0x04001F5D RID: 8029
			private int initialPosition;

			// Token: 0x04001F5E RID: 8030
			private TreeNodeObject tno;
		}

		// Token: 0x02000474 RID: 1140
		public class AddLightCommand : ICommand
		{
			// Token: 0x06001C4A RID: 7242 RVA: 0x000B6B78 File Offset: 0x000B4D78
			public AddLightCommand(int _no, int _dicKey, int _initialPosition)
			{
				this.no = _no;
				this.dicKey = _dicKey;
				this.initialPosition = _initialPosition;
			}

			// Token: 0x06001C4B RID: 7243 RVA: 0x000B6BA4 File Offset: 0x000B4DA4
			public void Do()
			{
				OCILight ocilight = AddObjectLight.Load(new OILightInfo(this.no, this.dicKey), null, null, true, this.initialPosition);
				this.tno = ((ocilight == null) ? null : ocilight.treeNodeObject);
			}

			// Token: 0x06001C4C RID: 7244 RVA: 0x000B6BEC File Offset: 0x000B4DEC
			public void Undo()
			{
				Studio.DeleteNode(this.tno);
				this.tno = null;
			}

			// Token: 0x06001C4D RID: 7245 RVA: 0x000B6C00 File Offset: 0x000B4E00
			public void Redo()
			{
				this.Do();
				Studio.SetNewIndex(this.dicKey);
			}

			// Token: 0x04001F5F RID: 8031
			private int no = -1;

			// Token: 0x04001F60 RID: 8032
			private int dicKey = -1;

			// Token: 0x04001F61 RID: 8033
			private int initialPosition;

			// Token: 0x04001F62 RID: 8034
			private TreeNodeObject tno;
		}
	}
}
